]> dgit.raspbian.org Git - ostree.git/commit
kargs: Fix crash on quoted values in /proc/cmdline
authorJoseph Marrero Corchado <jmarrero@redhat.com>
Mon, 13 Apr 2026 02:20:38 +0000 (22:20 -0400)
committerJoseph Marrero Corchado <jmarrero@redhat.com>
Fri, 26 Jun 2026 13:29:14 +0000 (09:29 -0400)
commit4f104a3f94e911e810e30d52a620721a68ba5c5c
tree91231a3abcd016167d7c34c1a934b779c825f432
parent6ea108187ffc6da276bef6761802d941529eb983
kargs: Fix crash on quoted values in /proc/cmdline

Bootloaders like GRUB may reformat quoted kernel arguments, producing
entries like "testparam=value with spaces" in /proc/cmdline. The
proc-cmdline parser was still using a naive space split (pre-dating the
quote-aware splitter added in abc7d5b9), so these tokens got broken
apart and hit a g_assert_false() abort downstream.

Use the quote-aware splitter for /proc/cmdline too, and downgrade the
unterminated-quote assert to g_debug() since we can't control what
bootloaders emit.

Reported by Arch Linux maintainers building ostree 2026.1.

Closes: https://github.com/ostreedev/ostree/issues/3582
Assisted-by: OpenCode (Claude Opus 4.6)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
src/libostree/ostree-kernel-args.c
tests/kolainst/destructive/kargs-proc-cmdline-quoted.sh [new file with mode: 0755]
tests/test-kargs.c